Loading TOC...

MarkLogic Server 11.0 Product Documentation
DELETE /v1/ext/{directories}/{asset}

Summary

Remove the asset with document URI /ext/{directories}/{asset} from the modules database associated with this REST API instance.

Response

MarkLogic Server responds with 204 (Deleted), whether or not there is an asset in the modules database with the specified document URI.

Required Privileges

This operation requires the rest-admin role, or the following privileges:

http://marklogic.com/xdmp/privileges/rest-admin

http://marklogic.com/xdmp/privileges/rest-reader

http://marklogic.com/xdmp/privileges/rest-writer

Usage Notes

/ext/{directories}/{asset} must be the document URI of the asset in the modules database, where {directories} is one or more database directory path steps, separated by "/", and {asset} is the asset document. See the example below.

To remove all assets in a database directory with a single request, use DELETE /v1/ext/{directories}.

For more details, see Managing Dependent Libraries and Other Assets in the REST Application Developer's Guide.

Example

$ curl --anyauth --user user:password -X DELETE -i \
    'http://localhost:8000/v1/ext/my/example/my-lib.xqy'

==> MarkLogic Server deletes the XQuery library module with the document 
    URI /ext/my/example/my-lib.xqy from the modules database associated
    with this REST API instance and returns a response similar to the
    following:

HTTP/1.1 204 Deleted
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.